home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 4.3 KB | 187 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: SLStrRun.xh.
- * Generated using:
- * SOM Precompiler somipc: 2.18
- * SOM Emitter emitxh.dll: 2.33
- */
-
- /*
- *
- *
- * File: SLStrRun.idl
- *
- * Contains: Interface for OTextRunReader and OTextRunWriter classes
- *
- * Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- *
- *
- */
-
-
- #ifndef SOM_FW_OStringRunWriter_xh
- #define SOM_FW_OStringRunWriter_xh
-
- class FW_OStringRunWriter;
-
- #define FW_OStringRunWriter_MajorVersion 1
- #define FW_OStringRunWriter_MinorVersion 0
-
- /*
- * Passthru lines: File: "C.xh", "before"
- */
- struct FW_SPrivStringRep;
-
- /* C++ SOM defs */
- #include <somcls.xh>
- #include <somcm.xh>
-
- /* C++ parent defs */
- #ifndef SOM_FW_OTextRunWriter_xh
- #include <SLTxtRun.xh>
- #endif
-
- #ifndef FW_OStringRunWriter_API
- #define FW_OStringRunWriter_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class SOMClass;
- class SOMObject;
- class FW_OTextRunReader;
- class FW_OTextRunWriter;
- class FW_OMemoryRunReader;
- class FW_OMemoryRunWriter;
- class FW_OStringRunWriter;
-
- /*
- * End of user-defined types.
- */
-
- #ifdef OLDIBMSOMAPISUPPORT
- #define FW_OStringRunWriterCClassData FW_OStringRunWriterClassData
- #define FW_OStringRunWriterNewClass(major,minor) somNewVersionedClassReference(FW_OStringRunWriter,major,minor)
- #endif
-
- /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
- #define FW_OStringRunWriterMetaClass SOMClass
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=power
- #endif
-
- /* The API to the FW_OStringRunWriter class object, and the methods it introduces. */
- SOMEXTERN struct FW_OStringRunWriterClassDataStructure {
- #ifdef OLDIBMSOMAPISUPPORT
- SOMClass *classObject; /* always zero, use somNewClassReference instead */
- #else
- long zero;
- #endif
- somStaticClassInfo *sci;
- somDToken instanceDataToken;
- long reserved [3];
- somMToken somInit;
- somMToken somUninit;
- somMToken GetCurrentRun;
- somMToken FlushRun;
- somMToken NewRun;
- somMToken Initialize;
- } SOMDLINK FW_OStringRunWriterClassData;
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=reset
- #endif
-
- #if !defined(FW_OStringRunWriter_Class_Source) && !defined(SOM_Module_slstrrun_Source)
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import list FW_OStringRunWriterClassData
- #endif
- #endif
-
-
- /*
- * -- Typedefs and inline method declarations for left path inherited methods
- * -- are omitted because this compilation had -museinheritedmethods in effect
- */
-
-
- /*
- * -- Typedefs for FW_OStringRunWriter Method Procedures
- */
- SOMEXTERN {
- typedef FW_OStringRunWriter* (* SOMLINK somTD_FW_OStringRunWriter_Initialize)(FW_OStringRunWriter *somSelf, Environment *ev,
- FW_SPrivStringRep* theString,
- short bufferSize);
- }
-
- #endif /* FW_OStringRunWriter_API */
-
-
- /*
- * -- This emitter treats Method Tokens as Thunks by default.
- * -- Use the sc modifier "nothunks" to change this default
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for FW_OStringRunWriter
- */
- class FW_OStringRunWriter : public FW_OTextRunWriter
- {
- public:
-
- // FW_OStringRunWriter::new registers use of the class object, and then uses somNew
- // to allocate memory and load the object method table pointer.
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- // Allocate memory using the default allocator for FW_OStringRunWriter, and
- // clear mem & set method table pointer, call basic initialization
- #ifdef SOMCHKNULL
- void * __somResult = (void *)
- somNewObject(FW_OStringRunWriter);
- SOMCHKNULL(__somResult);
- return __somResult;
- #else
- return (void*) somNewObject(FW_OStringRunWriter);
- #endif
- }
-
- // FW_OStringRunWriter::delete uses the default deallocator for the object's class.
- void operator delete(void * obj)
- {
- if (obj) {
- SOM_Resolve(obj,SOMObject,somFree)
- ( (SOMObject*) obj );
- }
- }
-
- /* method: Initialize */
- FW_OStringRunWriter* Initialize(Environment *ev,
- FW_SPrivStringRep* theString,
- short bufferSize)
- {
- #ifdef SOMCHKEXCEPT
- FW_OStringRunWriter* __somResult =
- SOM_ResolveD(this,FW_OStringRunWriter,FW_OStringRunWriter,Initialize)
- (this,ev,theString,bufferSize);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_OStringRunWriter,FW_OStringRunWriter,Initialize)
- (this,ev,theString,bufferSize);
- #endif
- }
-
- }; /* FW_OStringRunWriter */
-
-
-
- #endif /* SOM_FW_OStringRunWriter_xh */
-